<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title></title>
<#include "../../head.html"/>
<script type="text/javascript">
function getTableForm() {
	return document.getElementById('tableForm');
}
function optDelete() {
	if(Pn.checkedCount('ids')<=0) {
		alert("请选择您要操作的数据");
		return;
	}
	if(!confirm("您确定删除吗？")) {
		return;
	}
	var f = getTableForm();
	f.action="o_delete.do";
	f.submit();
}
</script>
</head>
<body>
<div class="box-positon">
	<div class="rpos">当前位置: 管理员(本站) - 列表</div>
	<form class="ropt">
		<input class="add" type="submit" value="添加" onclick="this.form.action='v_add.do';"/>
	</form>
	<div class="clear"></div>
</div>
<div class="body-box">
<form id="tableForm" method="post">
<input type="hidden" name="pageNo" value=""/>
<table class="pn-ltable" style="" width="100%" cellspacing="1" cellpadding="0" border="0">
<thead class="pn-lthead">
<tr>
	<th width="20"><input type='checkbox' onclick='Pn.checkbox("ids",this.checked)'/></th>
	<th>ID</th>
	<th>用户名</th>
	<th>角色</th>
	<th>会员组</th>
	<th>等级</th>
	<th>最后登录</th>
	<th>登录</th>
	<th>禁用</th>
	<th>操作选项</th>
</tr>
</thead>
<tbody  class="pn-ltbody">
<#list pagination.list as cmsUser>  
<tr onmouseover="this.bgColor='#eeeeee'" onmouseout="this.bgColor='#ffffff'">
	<td><input type='checkbox' name='ids' value='${cmsUser.id}'/></td>
	<td>${cmsUser.id}</td>
	<td><div title="">${cmsUser.username}<#if cmsUser.realname??> (${cmsUser.realname})</#if></div>
</td>
	<td><#list cmsUser.roles as r><div style="float:left;padding-right:3px">${r.name}</div></#list><div style="clear:both"></div></td>
	<td align="center">${cmsUser.group.name}</td>
	<td align="center">${cmsUser.rank}</td>
	<td align="center">${cmsUser.lastLoginTime?string('yyyy-MM-dd HH:mm:ss')}<br/>${cmsUser.lastLoginIp}</td>
	<td align="right">${cmsUser.loginCount}</td>
	<td align="center"><#if cmsUser.disabled><span style="color:red"><@s.m "global.true"/></span><#else><@s.m "global.false"/></#if></td>
	<td align="center"><a href="v_edit.do?id=${cmsUser.id}&pageNo=" class="pn-opt">修改</a> | <a href="o_delete.do?ids=${cmsUser.id}&pageNo=" onclick="if(!confirm('您确定删除吗？')) {return false;}" class="pn-opt">删除</a>
	</td>
</tr>
</#list>
</tbody>
</table>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td align="center" class="pn-sp">
	共 3 条&nbsp;
	每页<input type="text" value="20" style="width:30px" onfocus="this.select();" onblur="$.cookie('_cookie_page_size',this.value,{expires:3650});" onkeypress="if(event.keyCode==13){$(this).blur();return false;}"/>条&nbsp;
	<input class="first-page" type="button" value="首 页" onclick="_gotoPage('1');" disabled="disabled"/>
	<input class="pre-page" type="button" value="上一页" onclick="_gotoPage('1');" disabled="disabled"/>
	<input class="next-page" type="button" value="下一页" onclick="_gotoPage('1');" disabled="disabled"/>
	<input class="last-page" type="button" value="尾 页" onclick="_gotoPage('1');" disabled="disabled"/>&nbsp;
	当前 1/1 页 &nbsp;转到第<input type="text" id="_goPs" style="width:50px" onfocus="this.select();" onkeypress="if(event.keyCode==13){$('#_goPage').click();return false;}"/>页
	<input class="go" id="_goPage" type="button" value="转" onclick="_gotoPage($('#_goPs').val());" disabled="disabled"/>
</td></tr></table>
<script type="text/javascript">
function _gotoPage(pageNo) {
	try{
		var tableForm = getTableForm();
		$("input[name=pageNo]").val(pageNo);
		tableForm.action="v_list.do";
		tableForm.onsubmit=null;
		tableForm.submit();
	} catch(e) {
		alert('_gotoPage(pageNo)方法出错');
	}
}
</script>
<div style="margin-top:15px;"><input class="del-button" type="button" value="删除" onclick="optDelete();"/></div>
</form>
</div>
</body>
</html>